package com.aabte.design2.behavioral.command;

/**
 * @author Daniel
 * @version 1.0
 * @date 2020/5/3
 */
public class Button {
    private AbstractCommand command;

    public void setCommand(AbstractCommand command) {
        this.command = command;
    }

    public AbstractCommand getCommand() {
        return command;
    }

    public void onClick() {
        command.getApp().executeCommand(command);
    }
}
